import request from "../utils/request.js";


export const employeeLoginService = (loginData) => {

    let params = new URLSearchParams();

    for (let key in loginData) {
        params.append(key, loginData[key]);
    }

    return request.get("/air/manager/employee/login", { params });

};

// 提供调用注册接口的函数
export const employeeRegisterService = (registerData) => {
  // 借助UrlSearchParams完成传递
  const params = new URLSearchParams();

  for (let key in registerData) {
    params.append(key, registerData[key]);
  }

  return request.get("/air/manager/employee/register", { params: params });
};

export const getemployeeInfoService = () => {

  return request.post("/air/manager/employee/getEmployeeInfo");
}

export const updateAvatarInfoService=  (params) => {

  return request.get("/air/manager/employee/updateAvatar", {params: params});
}

export const updateemployeeInfoService = (employeeInfoData) => {

  return request.put("/air/manager/employee/modify", employeeInfoData);

}

export const updatePasswordService = (params) => {

  return request.get("/air/manager/employee/changePassword", {params: params});

}